<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateForumTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('forum', function (Blueprint $table) {
            $table->increments('id')->comment('标识');
            $table->string('title')->nullable()->comment('标题');
            $table->string('desc')->nullable()->comment('描述');
            $table->mediumText('content')->nullable()->comment('内容');
            $table->integer('img_id')->default(0)->comment('图片id');
            $table->integer('read_num')->default(0)->comment('阅读数量');
            $table->integer('is_essence')->default(0)->comment('是否精华');
            $table->integer('user_id')->default(0)->comment('关联用户');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
